package org.shoukaiseki.aqoeous.model;

import com.alibaba.fastjson.JSONObject;

import java.util.Map;

/**
 *
 **/
public class TriggerHandlerParam {

    //0: 元数据可以转为 JSONObject
    //1: 元数据无法转为 JSONObject ,只能放到 model 中,return args.model
    private int  rowType=0;

    //行数据,如果是元数据(int,long,bigDecimal,等),则只有 model 存放值
    private JSONObject row;

    //row 实际的实体类
    private Object model;

    private Map<String,Object> resultMap;


    private String resultName;

    private Object customQOProcessor;

    public JSONObject getRow() {
        return row;
    }

    public TriggerHandlerParam setRow(JSONObject row) {
        this.row = row;
        return this;
    }

    public Map<String, Object> getResultMap() {
        return resultMap;
    }

    public TriggerHandlerParam setResultMap(Map<String, Object> resultMap) {
        this.resultMap = resultMap;
        return this;
    }

    public Object getModel() {
        return model;
    }

    public TriggerHandlerParam setModel(Object model) {
        this.model = model;
        return this;
    }

    public int getRowType() {
        return rowType;
    }

    public TriggerHandlerParam setRowType(int rowType) {
        this.rowType = rowType;
        return this;
    }

    public String getResultName() {
        return resultName;
    }

    public TriggerHandlerParam setResultName(String resultName) {
        this.resultName = resultName;
        return this;
    }

    public Object getCustomQOProcessor() {
        return customQOProcessor;
    }

    public TriggerHandlerParam setCustomQOProcessor(Object customQOProcessor) {
        this.customQOProcessor = customQOProcessor;
        return this;
    }
}
